package com.itbaizhan.shopping_common.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itbaizhan.shopping_common.pojo.Specification;
import com.itbaizhan.shopping_common.pojo.SpecificationOption;
import com.itbaizhan.shopping_common.pojo.SpecificationOptions;

import java.util.List;

//商品规格服务
public interface SpecificationService {
    //新增规格
    void add(Specification specification);
    //修改规格
    void update(Specification specification);
    //删除规格
    void delete(Long[] ids);
    //分页查询规格
    Page<Specification> search(int page,int size);
    //根据id查询规格
    Specification findById(Long id);
    //根据商品类型id查询规格
    List<Specification> findByProductTypeId(Long productTypeId);

    //新增商品规格项
    void addOptions(SpecificationOptions specificationOptions);
    //删除商品规格项
    void deleteOptions(Long[] ids);
}
